package com.zr.java8.pattern.chain.handler;

import com.zr.java8.pattern.chain.Approver;
import com.zr.java8.pattern.chain.LeaveApplication;

/**
 * 具体处理器3：总经理
 */
public class GeneralManagerHandler extends Approver {
    @Override
    public void processLeaveApplication(LeaveApplication application) {
        if (application.getDays() <= 10) {
            System.out.println("General Manager approved leave for " + application.getDays() + " days");
        } else {
            System.out.println("Leave application rejected for " + application.getDays() + " days");
        }
    }
}
